import { createApp } from 'vue'
import 'animate.css'
import '@/theme/element/index.scss'
import '@/theme/index.scss'
import App from './App.vue'
import router from '@/router/index'
import store from '@/store/index'
import { i18n } from '@/lang'
import axios from 'axios'
import vueAxios from 'vue-axios'
import ElementPlus from 'element-plus'
import 'amfe-flexible'
import 'virtual:svg-icons-register'
import elementResizeDetectorMaker from 'element-resize-detector'

import { Menu } from '@element-plus/icons-vue'

const app = createApp(App)

// todo 后面删掉
// eslint-disable-next-line vue/multi-word-component-names,vue/no-reserved-component-names
app.component('Menu', Menu)
// 运行中增加 $erd
declare module '@vue/runtime-core' {
  interface ComponentCustomProperties {
    $erd: any
  }
}
// 全局
app.config.globalProperties.$erd = elementResizeDetectorMaker()
// 其它
app.use(ElementPlus)
app.use(router)
app.use(store)
app.use(i18n)
app.use(vueAxios, axios)
app.mount('#rootLGId')
